<template>
    <div>
        <div class="book_title">
            <h1 align="center">已完成补货任务</h1>
        </div>
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>系统中心</el-breadcrumb-item>
            <el-breadcrumb-item>已完成补货任务</el-breadcrumb-item>
        </el-breadcrumb>
        <hr>
        <br>
        <el-table
                :data="replenishmentTask"
                height="250"
                border
                style="width: 100%">
            <el-table-column prop="id" label="编号" width="130"></el-table-column>
            <el-table-column prop="bookName" label="图书名称" width="130"></el-table-column>
            <el-table-column prop="planReplenishmentNum" label="计划补货量" width="130"></el-table-column>
            <el-table-column prop="finishStatus" label="完成状态" width="130">
                <template slot-scope="scope">
                    <span v-if="scope.row.finishStatus==0">未完成</span>
                    <span v-if="scope.row.finishStatus==1">已完成</span>
                </template>
            </el-table-column>
            <el-table-column label="创建时间" width="130">
                <template slot-scope="scope">
                    {{scope.row.createTime | datefmt('YYYY/MM/DD')}}
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        name: "getReplenishmentTaskByFinish",
        data(){
            return{
                replenishmentTask:[]
            }
        },
        methods:{
            getReplenishmentTaskByFinish:function () {
                this.$http.post('/getReplenishmentTaskByFinish').then((res)=>{
                  console.log(res)
                    if(res.data.success){
                      this.replenishmentTask=res.data.result.tbReplenishmentTask;
                    }else {
                      this.$message.error(res.data.message)
                    }
                })
            }
        },
        mounted() {
            this.getReplenishmentTaskByFinish();
        }
    }
</script>

<style scoped>

</style>
